/**
 * Copyright (c)  2017,newtouch.com
 * All rights reserved.
 * BaseEntity.java 16/8/26
 */
package com.newtouch.ainsurtech;



import com.newtouch.ainsurtech.listener.BaseEntityListener;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 描述:BaseEntity 所有模型基础类
 *
 * @author ziv.hung create on 16/8/26
 * @since 1.0
 */
@Data
@NoArgsConstructor
@MappedSuperclass
@EntityListeners(BaseEntityListener.class)
public class BaseEntity implements Serializable{
    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Column(name = "ID")
    private Long id;

    /**
     * 插入时间
     */
    @Column(name = "INSERT_TIME")
    private Date insertTime;

    /**
     * 插入操作者
     */
    @Column(name = "INSERT_OPERATOR")
    private String insertOperator;

    /**
     * 插入操作者编号
     */
    @Column(name = "INSERT_OPERATOR_ID")
    private Long insertOperatorId;

    /**
     * 更新时间
     */
    @Column(name = "MODIFY_TIME")
    private Date modifyTime;

    /**
     * 更新操作者
     */
    @Column(name = "MODIFY_OPERATOR")
    private String modifyOperator;

    /**
     * 更新操作者编号
     */
    @Column(name = "MODIFY_OPERATOR_ID")
    private Long modifyOperatorId;
}
